<tagLib name="html" />
<include file="Public:header" />
<script src="__PUBLIC__/Js/jquery-1.4.4.min.js"></script>
<div id="main" class="main" >
<div class="content">
<div class="title">修改房间 [ <a href="javascript:history.back()">返回列表</a> ]</div>
<form method='post' id="form1" enctype="multipart/form-data" action="__URL__/update">
<table cellpadding=3 cellspacing=3>
   <tr><td colspan="2"><font color="#174B73"> <b>     {$vo.house_id|getModelName=House,hotel_id|getModelName=Hotel} >> {$vo.house_id|getModelName=House} >> {$vo.room_no}</b></font></td></tr>
<tr>
	<td class="tRight" >房间名称(编号)：</td>
	<td class="tLeft" >
            <input type="text" class="medium bLeftRequire"  check='Require' warning="公寓名不能为空" id="name" name="room_no" value="{$vo.room_no}">
        </td>
</tr>
<tr>
	<td class="tRight" >所属房型：</td>
	<td class="tLeft" >
            <php>
                $this_hotel_id = getModelName($vo['house_id'],'House','hotel_id');
            </php>
            <select name="hotel" style="width:200px;" onchange="modifyHouse(this);">
                        <option value="0">--请选择公寓--</option>
                        <volist name="hotel" id="ht">
                            <option value="{$ht.id}" <eq name="this_hotel_id" value="$ht.id">selected</eq> >{$ht.name}</option>
                        </volist>
                    </select>
             {$vo.house_id|makeHouse=1}
        </td>
</tr>
<tr>
	<td class="tRight" >备注：</td>
	<td class="tLeft" >
            <textarea name="note" cols="57" rows="8">{$vo.note}</textarea>
        </td>
</tr>
<tr>
	<td class="tRight" >排序：</td>
	<td class="tLeft" >
            <input type="text" class="small" name="sort" value="{$vo.sort}">
        </td>
</tr>
<tr>
	<td class="tRight">状态：</td>
	<td class="tLeft">
            <SELECT class="small bLeft"  name="status">
                <option value="1" <eq name="vo.status" value="1">selected</eq> >启用</option>
                <option value="0" <eq name="vo.status" value="0">selected</eq> >禁用</option>
            </SELECT>
        </td>
</tr>

<tr>
	<td></td>
	<td class="center"><input type="hidden" name="id" value="{$vo.id}" >
	<input type="submit" value="更新" class="small submit">
	<input type="reset" class="reset imgButton" onclick="javascript:history.back()" value="返回" >
	</td>
</tr>
</table>
</form>
<h2>房间租期</h2><html:imageBtn name="add" value="新增" click="addMore({$vo.id})" style="impBtn hMargin fLeft shadow" />
<table class="list">
  <tr>
    <th>编号</th><th>开始时间</th><th>结束时间</th><th>编辑</th><th>删除</th>
  </tr>
  <volist name="availables" id="av">
    <form action="__APP__/Room_available/update" method="post">
      <tr>
      <td>{$av.id}</td>
      <td>
      <input type="text" id="start_time" name="start_time" value="{$av.start_time|toDate}" onClick="WdatePicker({dateFmt:'yyyy-MM-dd HH:mm:ss'})" /></td>
      <td>
        <input type="text" id="start_time" name="end_time" value="{$av.end_time|toDate}" onClick="WdatePicker({dateFmt:'yyyy-MM-dd HH:mm:ss'})" />
      </td>
      <td>
        <input type="hidden" value="__URL__/edit/id/{$vo.id}" name="jumpUrl">
        <input type="hidden" value="{$av.id}" name="id">
        <input type="submit" value="保存"  class="save imgButton">
      </td>
      <td>
      <a href="__APP__/Room_available/foreverdelete/id/{$av.id}">删除</a>  
      </td>
    </tr>
  </form>
  </volist>

  
</table>
</div>
</div>
<script type="text/javascript">
   function addMore(id){
       location.href ="__APP__/Room_available/add/id/"+id;

        }
</script>
<load href="__PUBLIC__/Js/My97DatePicker/WdatePicker.js" />
